//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __ELASTOS_ROUND_H__
#define __ELASTOS_ROUND_H__

#ifdef __cplusplus

INLINE uint_t RoundUp2Order2(uint_t u)
{
    u--;
    u |= u >> 16;
    u |= u >> 8;
    u |= u >> 4;
    u |= u >> 2;
    u |= u >> 1;
    u++;
    return u;
}

#endif // __cplusplus

#endif //__ELASTOS_ROUND_H__
